<?php $this->load->view('header'); ?>
<?php $this->load->view('cuerpo'); ?>
<section id="dt_example">
    <div id="container">
        <table border="1" class="display" id="example">
            <thead>
            	<tr>
            		<th colspan="10" style="text-align: justify;">
            		</th>
            	</tr>
            	
                <tr>
                    <th>N° SOLICITUD</th>
                    <th>FECHA DE REGISTRO</th>
                    <th>TIPO CLIENTE</th>
                    <th>NOMBRE/RAZÓN SOCIAL</th>
                    <th>MONEDA</th>
                    <th>IGV</th>
                    <th>MARCA</th>
                    <th>MODELO</th>
                    <th>ESTADO</th>
                    <th>VER</th>
                </tr>
            </thead>
            <tbody>
                <?php
                    foreach ($lstSolicitud as $data) {
                        $codigo = '';
                        $numCaracteres = strlen($data->id_solicitud);
                        for ($iPos = 0; $iPos < $tamCodigo - $numCaracteres; $iPos++) {
                            $codigo .= '0';
                        }
                        $codigo .= $data->id_solicitud;
                ?>
                <tr>
                    <td><?php echo $codigo ?></td>
                    <td><?php echo date("d/m/Y", strtotime($data->fecha_registro))?></td>
                    <td><?php echo $data->tipoPersona ?></td>
                    <td><?php echo $data->dato1 . ' ' . $data->dato2 ?></td>
                    <td><?php echo $data->nomMoneda ?></td>
                    <td>
                        <?php
                            if ($data->igv == 1) {
                                echo STR_SI;
                            } else {
                                echo STR_NO;
                            }
                        ?>
                    </td>
                    <td><?php echo $data->nomMarca ?></td>
                    <td><?php echo $data->nomModelo ?></td>
                    <td><?php echo $data->nomEstado ?></td>
                    <td class="center">
                        <a href="<? echo base_url();?>index.php/solicitud/nuevo?id=<?= $data->id_solicitud ?>&lectura=1">
                            <img src="<? echo base_url();?>images/ver.png" width="20" height="20" />
                        </a>
                    </td>
                </tr>
                <?php
                    }
                ?>
            </tbody>
        </table>
    </div>
</section>
<?php $this->load->view('footer'); ?>